﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Requirement">
    <DESCRIPTION>Includes information to track the requirement through the application life cycle</DESCRIPTION>
    <FIELDS>
      <FIELD name="Id" refname="System.Id" type="Integer" />
      <FIELD name="Title" refname="System.Title" type="String">
        <REQUIRED />
        <HELPTEXT>Short description of the requirement used to differentiate it in a list or report</HELPTEXT>
      </FIELD>
      <FIELD name="Requirement Type" refname="Microsoft.VSTS.CMMI.RequirementType" type="String" reportable="dimension">
        <REQUIRED />
        <ALLOWEDVALUES>
          <LISTITEM value="Functional" />
          <LISTITEM value="Non-Functional" />
          <LISTITEM value="Feature" />
          <LISTITEM value="Performance" />
          <LISTITEM value="Safety" />
          <LISTITEM value="Security" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="Functional" />
      </FIELD>
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
        <HELPTEXT>The person currently working on this requirement</HELPTEXT>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
        <HELPTEXT>Discussion thread and other historical information</HELPTEXT>
      </FIELD>
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath">
        <HELPTEXT>The area of the product with which this requirement is associated</HELPTEXT>
      </FIELD>
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath">
        <HELPTEXT>The iteration of the product with which this requirement is associated</HELPTEXT>
      </FIELD>
      <FIELD name="State" refname="System.State" type="String">
        <HELPTEXT>The workflow state of the requirement</HELPTEXT>
      </FIELD>
      <FIELD name="Reason" refname="System.Reason" type="String">
        <HELPTEXT>The reason why the requirement is in the current state</HELPTEXT>
      </FIELD>
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" />
      <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true">
        <VALIDUSER />
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" />
      <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" />
      <FIELD name="Description" refname="System.Description" type="PlainText">
        <HELPTEXT>User activity or constraint enabled when this is implemented, with links to supporting documents</HELPTEXT>
      </FIELD>
      <!-- *************** Common Fields ****************   -->
      <FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
        <WHENCHANGED field="System.State">
          <SERVERDEFAULT from="clock" />
        </WHENCHANGED>
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Resolved Date" refname="Microsoft.VSTS.Common.ResolvedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Resolved By" refname="Microsoft.VSTS.Common.ResolvedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Resolved Reason" refname="Microsoft.VSTS.Common.ResolvedReason" type="String" reportable="dimension" />
      <FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
      </FIELD>
      <FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" syncnamechanges="true" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
      </FIELD>
      <FIELD name="Priority" refname="Microsoft.VSTS.Common.Priority" type="Integer" reportable="dimension">
        <REQUIRED />
        <ALLOWEDVALUES>
          <LISTITEM value="1" />
          <LISTITEM value="2" />
          <LISTITEM value="3" />
          <LISTITEM value="4" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="2" />
        <HELPTEXT>Priority for incorporating the requirement, based on business goals</HELPTEXT>
      </FIELD>
      <FIELD name="Stack Rank" refname="Microsoft.VSTS.Common.StackRank" type="Double" reportable="dimension">
        <HELPTEXT>Work first on items with lower-valued stack rank. Set in triage.</HELPTEXT>
      </FIELD>
      <FIELD name="Triage" refname="Microsoft.VSTS.Common.Triage" type="String" reportable="dimension">
        <REQUIRED />
        <ALLOWEDVALUES>
          <LISTITEM value="Pending" />
          <LISTITEM value="More Info" />
          <LISTITEM value="Info Received" />
          <LISTITEM value="Triaged" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="Pending" />
        <HELPTEXT>Status of triaging the requirement</HELPTEXT>
      </FIELD>
      <FIELD name="Blocked" refname="Microsoft.VSTS.CMMI.Blocked" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="Yes" />
          <LISTITEM value="No" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No" />
      </FIELD>
      <FIELD name="Committed" refname="Microsoft.VSTS.CMMI.Committed" type="String">
        <REQUIRED />
        <ALLOWEDVALUES>
          <LISTITEM value="Yes" />
          <LISTITEM value="No" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="No" />
        <HELPTEXT>Has the requirement been committed?</HELPTEXT>
      </FIELD>
      <FIELD name="Impact Assessment HTML" refname="Microsoft.VSTS.CMMI.ImpactAssessmentHtml" type="HTML" />
      <!-- **************** Build Integration Fields *******************************************  -->
      <!-- **************** Scheduling Fields *************************************************  -->
    </FIELDS>
    <WORKFLOW>
      <STATES>
        <STATE value="Proposed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Active">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <REQUIRED />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <REQUIRED />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Resolved">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
              <COPY from="field" field="System.Reason" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <REQUIRED />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <REQUIRED />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Closed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <REQUIRED />
            </FIELD>
          </FIELDS>
        </STATE>
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Proposed">
          <REASONS>
            <DEFAULTREASON value="New" />
          </REASONS>
          <FIELDS>
            <FIELD refname="System.AssignedTo">
              <DEFAULT from="currentuser" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Proposed" to="Active">
          <REASONS>
            <REASON value="Investigate" />
            <DEFAULTREASON value="Accepted" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Active" to="Proposed">
          <REASONS>
            <REASON value="Postponed" />
            <DEFAULTREASON value="Investigation Complete" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Active" to="Resolved">
          <ACTIONS>
            <ACTION value="Microsoft.VSTS.Actions.Checkin" />
          </ACTIONS>
          <REASONS>
            <DEFAULTREASON value="Code Complete and System Test Passed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Active" to="Closed">
          <REASONS>
            <REASON value="Abandoned" />
            <REASON value="Out-of-scope" />
            <DEFAULTREASON value="Split" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Resolved" to="Active">
          <REASONS>
            <DEFAULTREASON value="Validation Test Failed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Resolved" to="Closed">
          <REASONS>
            <DEFAULTREASON value="Validation Test Passed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Proposed" to="Closed">
          <REASONS>
            <DEFAULTREASON value="Rejected" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Closed" to="Active">
          <REASONS>
            <REASON value="Reintroduced in Scope" />
            <DEFAULTREASON value="Closed in Error" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
              <COPY from="currentuser" />
              <VALIDUSER />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
              <SERVERDEFAULT from="clock" />
            </FIELD>
            <FIELD refname="System.AssignedTo">
              <COPY from="field" field="Microsoft.VSTS.Common.ClosedBy" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout>
        <Group>
          <Column PercentWidth="70">
            <Control Type="FieldControl" FieldName="System.Title" Label="&amp;Title:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="30">
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.RequirementType" Label="Requirement T&amp;ype:" LabelPosition="Left" />
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="50">
            <Group Label="Status">
              <Column PercentWidth="100">
                <Control Type="FieldControl" FieldName="System.AssignedTo" Label="Assi&amp;gned To:" LabelPosition="Left" />
                <Control Type="FieldControl" FieldName="System.State" Label="&amp;State:" LabelPosition="Left" />
                <Control Type="FieldControl" FieldName="System.Reason" Label="&amp;Reason:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
          <Column PercentWidth="50">
            <Group Label="Classification">
              <Column PercentWidth="100">
                <Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="Ite&amp;ration:" LabelPosition="Left" ReadOnly="True" />
                <Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="&amp;Area:" LabelPosition="Left" />
              </Column>
            </Group>
          </Column>
        </Group>
        <Group Label="Planning">
          <Column PercentWidth="25">
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Priority" Label="&amp;Priority:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="25">
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Triage" Label="&amp;Triage:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="25">
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.Blocked" Label="&amp;Blocked:" LabelPosition="Left" />
          </Column>
          <Column PercentWidth="25">
            <Control Type="FieldControl" FieldName="Microsoft.VSTS.CMMI.Committed" Label="&amp;Committed:" LabelPosition="Left" />
          </Column>
        </Group>
        <TabGroup>
          <Tab Label="Details">
            <Group>
              <Column PercentWidth="50">
                <Control Type="HtmlFieldControl" FieldName="System.Description" Label="&amp;Description:" LabelPosition="Top" Dock="Fill" />
              </Column>
              <Column PercentWidth="50">
                <Control Type="WorkItemLogControl" FieldName="System.History" Label="&amp;History:" LabelPosition="Top" Dock="Fill" />
              </Column>
            </Group>
          </Tab>
          <Tab Label="Analysis">
            <Control Type="HtmlFieldControl" FieldName="Microsoft.VSTS.CMMI.ImpactAssessmentHtml" Label="Impact assessment:" LabelPosition="Top" Dock="Fill" />
          </Tab>
          <Tab Label="Uses Cases">
            <Control Type="LinksControl" Name="Hierarchy" Label="" LabelPosition="Top">
              <LinksControlOptions>
                <LinkColumns>
                  <LinkColumn RefName="System.Id" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="System.LinkTypes.Hierarchy" FilterOn="forwardname" />
                </WorkItemLinkFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Use Case" />
                </WorkItemTypeFilters>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Change Requests">
            <Control Type="LinksControl" Name="ChangeRequests" Label="Change Requests affecting this Requirement:" LabelPosition="Top">
              <LinksControlOptions>
                <WorkItemLinkFilters FilterType="include">
                  <Filter LinkType="Microsoft.VSTS.Common.Affects" FilterOn="reversename" />
                </WorkItemLinkFilters>
                <WorkItemTypeFilters FilterType="include">
                  <Filter WorkItemType="Change Request" />
                </WorkItemTypeFilters>
                <ExternalLinkFilters FilterType="excludeAll" />
                <LinkColumns>
                  <LinkColumn RefName="System.ID" />
                  <LinkColumn RefName="System.WorkItemType" />
                  <LinkColumn RefName="System.Title" />
                  <LinkColumn RefName="System.AssignedTo" />
                  <LinkColumn RefName="System.State" />
                  <LinkColumn LinkAttribute="System.Links.Comment" />
                </LinkColumns>
              </LinksControlOptions>
            </Control>
          </Tab>
          <Tab Label="Attachments">
            <Control Type="AttachmentsControl" LabelPosition="Top" />
          </Tab>
        </TabGroup>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>